package com.zzw.zim.system.entitys;

import com.baomidou.mybatisplus.annotation.TableField;
import com.baomidou.mybatisplus.annotation.TableId;
import com.baomidou.mybatisplus.annotation.TableName;

import java.io.Serializable;
import java.util.Date;

import com.fasterxml.jackson.annotation.JsonFormat;
import io.swagger.annotations.ApiModel;
import io.swagger.annotations.ApiModelProperty;
import lombok.Data;
import org.springframework.format.annotation.DateTimeFormat;

/**
 * 菜单管理
 *
 * @author XiaoJie
 * @date 2025-05-13 09:43:18
 */
@ApiModel(value = "系统菜单实体")
@Data
@TableName("sys_menu")
public class SysMenuEntity implements Serializable {
	private static final long serialVersionUID = 1L;

	@ApiModelProperty(value = "id")
	@TableId
	private String id;

	@ApiModelProperty(value = "上级ID，一级菜单为0")
	@TableField("pid")
	private String pid;

	@ApiModelProperty(value = "菜单名称")
	@TableField("name")
	private String name;

	@ApiModelProperty(value = "菜单URL")
	@TableField("url")
	private String url;

	@ApiModelProperty(value = "授权标识(多个用逗号分隔，如：sys:menu:list,sys:menu:save)")
	@TableField("authority")
	private String authority;

	@ApiModelProperty(value = "类型（0：菜单；1：按钮；2：接口）")
	@TableField("type")
	private Integer type;

	@ApiModelProperty(value = "打开方式（0：内部；1：外部）")
	@TableField("open_style")
	private Integer openStyle;

	@ApiModelProperty(value = "菜单图标")
	@TableField("icon")
	private String icon;

	@ApiModelProperty(value = "排序")
	@TableField("sort")
	private Integer sort;

	@ApiModelProperty(value = "版本号")
	@TableField("version")
	private Integer version;

	@ApiModelProperty(value = "删除标识（0：正常；1：已删除）")
	@TableField("deleted")
	private Integer deleted;

	@ApiModelProperty(value = "创建者")
	@TableField("creator")
	private String creator;

	@ApiModelProperty(value = "创建时间")
	@TableField("create_time")
	@JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss", timezone = "GMT+8")
	private Date createTime;

	@ApiModelProperty(value = "更新者")
	@TableField("updater")
	private String updater;

	@ApiModelProperty(value = "更新时间")
	@TableField("update_time")
	@JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss", timezone = "GMT+8")
	private Date updateTime;

}
